<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人相册</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            margin: 0;
            height: 100vh;
            background-color: #f0f0f0;
            font-family: Arial, sans-serif;
        }
        
        h1 {
            margin-bottom: 20px;
        }

        .gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            max-width: 900px;
            width: 100%;
            padding: 10px;
        }

        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s;
        }

        .gallery-item img {
            width: 100%;
            height: auto;
            border-radius: 10px;
            transition: transform 0.3s;
        }

        .gallery-item:hover img {
            transform: scale(1.1); /* 鼠标悬停时放大图片 */
        }

        .gallery-item:hover {
            transform: scale(1.05); /* 鼠标悬停时放大整个项 */
        }

        .overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.3s;
            border-radius: 10px;
        }

        .gallery-item:hover .overlay {
            opacity: 1; /* 悬停时显示覆盖层 */
        }
    </style>
</head>
<body>

    <h1>个人相册</h1>
    <div class="gallery">
        <div class="gallery-item">
            <img src="./img/p1.jpg" alt="Image 1">
            <div class="overlay">图片 1</div>
        </div>
        <div class="gallery-item">
            <img src="./img/p2.jpg" alt="Image 2">
            <div class="overlay">图片 2</div>
        </div>
        <div class="gallery-item">
            <img src="./img/p3.jpg" alt="Image 3">
            <div class="overlay">图片 3</div>
        </div>
        <div class="gallery-item">
            <img src="./img/p4.jpg" alt="Image 4">
            <div class="overlay">图片 4</div>
        </div>
        <div class="gallery-item">
            <img src="./img/p5.jpg" alt="Image 5">
            <div class="overlay">图片 5</div>
        </div>
        <div class="gallery-item">
            <img src="./img/p6.jpg" alt="Image 6">
            <div class="overlay">图片 6</div>
        </div>
		<div class="gallery-item">
		    <img src="./img/p7.jpg" alt="Image 7">
		    <div class="overlay">图片 7</div>
		</div>
		<div class="gallery-item">
		    <img src="./img/p8.jpg" alt="Image 8">
		    <div class="overlay">图片 8</div>
		</div>
		<div class="gallery-item">
		    <img src="./img/p9.jpg" alt="Image 9">
		    <div class="overlay">图片 9</div>
		</div>
		
    </div>

</body>
</html>
